Skip to content

Add workflow to test 500 artifact upload limit#42

Closed
Copilot wants to merge 6 commits intomainfrom
copilot/test-artifact-upload-limit
Closed

Add workflow to test 500 artifact upload limit#42
Copilot wants to merge 6 commits intomainfrom
copilot/test-artifact-upload-limit

Conversation

Copy link
Contributor

Copilot AI commented Jan 21, 2026

Tests GitHub Actions' 500 artifact per workflow run limit by attempting to upload 501 files individually, then demonstrates the workaround using a single zip archive.

Implementation

Workflow: .github/workflows/test-artifact-limit.yml

  • Trigger: workflow_dispatch (manual)
  • Creates 501 test files
  • Attempts programmatic upload via @actions/artifact@2.1.10 with DefaultArtifactClient
  • Uses continue-on-error: true to capture expected failure at artifact #501
  • Zips all files and uploads as single artifact using upload-artifact@v4
  • Generates detailed summary showing results and best practices

Key code

The workflow programmatically uploads artifacts using Node.js:

const { DefaultArtifactClient } = require('@actions/artifact');
const artifact = new DefaultArtifactClient();

for (let i = 0; i < 501; i++) {
  await artifact.uploadArtifact(
    `test-artifact-${i + 1}`,
    [filePath],
    testFilesDir
  );
  // Expected to fail at i=500 (artifact #501)
}

Then demonstrates the workaround:

- name: Create and upload zip
  run: zip -r all-files.zip test-files/
- uses: actions/upload-artifact@v4
  with:
    name: all-501-files-zipped
    path: all-files.zip

This provides a self-contained test demonstrating both the limit and its solution in a single workflow file.

Original prompt

This section details on the original issue you should resolve

<issue_title>Create a workflow to test the 500 artifact limit for upload artifact action</issue_title>
<issue_description>According to the Upload Artifact action, there is a maximum limit of 500 artifacts that can be uploaded to a job.

https://github.com/actions/upload-artifact?tab=readme-ov-file#breaking-changes

Create a single workflow file, with everything contained in the workflow file, to test this. I want to try and load 501 files and see what happens. Then I want to zip those 501 files into a single zip file and see if it loads. </issue_description>

Comments on the Issue (you are @copilot in this section)


💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.

Copilot AI and others added 5 commits January 21, 2026 21:52
Co-authored-by: mickeygousset <20031479+mickeygousset@users.noreply.github.com>
Co-authored-by: mickeygousset <20031479+mickeygousset@users.noreply.github.com>
Co-authored-by: mickeygousset <20031479+mickeygousset@users.noreply.github.com>
Co-authored-by: mickeygousset <20031479+mickeygousset@users.noreply.github.com>
Co-authored-by: mickeygousset <20031479+mickeygousset@users.noreply.github.com>
Copilot AI changed the title [WIP] Create workflow to test 500 artifact upload limit Add workflow to test 500 artifact upload limit Jan 21, 2026
Copilot AI requested a review from mickeygousset January 21, 2026 21:58
@mickeygousset mickeygousset deleted the copilot/test-artifact-upload-limit branch January 21, 2026 22:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Create a workflow to test the 500 artifact limit for upload artifact action

2 participants